package com.alks.yn_zs.mapper;

import com.alks.entity.data.page.PageParam;
import com.alks.yn_zs.data.dto.FinishStoreDTO;
import com.alks.yn_zs.data.dto.FinishStoreDailyDTO;
import com.alks.yn_zs.data.dto.FinishStoreInOutDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author: chen
 * @date: 2024/11/22
 * @description: 成品仓储
 */
@Mapper
public interface FinishStoreMapper {

    /**
     * 分页获取库存详情列表
     * @param pageParam
     * @return
     */
    List<FinishStoreDTO> listDetail(@Param("request") PageParam pageParam);

    /**
     * 根据时间汇总出入库数据
     * @param beginTime
     * @param endTime
     * @return
     */
    FinishStoreInOutDTO summaryByTime(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);

    /**
     * 汇总总库存
     * @return
     */
    Long summaryStore();

    /**
     * 按日汇总给定时间返回内的数据
     * @param beginTime
     * @param endTime
     * @return
     */
    List<FinishStoreDailyDTO> summaryDaily(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);

}
